package com.mediastory.spsserver.guideFile.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.mediastory.spsserver.guideFile.dao.GuideFileDao;
import com.mediastory.spsserver.guideFile.domain.GuideFile;
import com.mediastory.spsserver.guideFile.service.GuideFileSvc;

@Service
@Transactional
public class GuideFileSvcImpl implements GuideFileSvc {
	
	@Autowired
	GuideFileDao guideFileDao;

	public GuideFileSvcImpl() {
		// TODO Auto-generated constructor stub
	}

	@Override
	public List<GuideFile> findbyList(Map<String, Object> condition)
			throws Exception {
		// TODO Auto-generated method stub
		return (List<GuideFile>) (guideFileDao.SelectList(condition));
	}

	public Map<String, Object> findbyListPaging(Map<String, Object> condition)
			throws Exception {
		// TODO Auto-generated method stub
		Map<String, Object> resultMap = new HashMap<String, Object>();
		resultMap.put("contentList", (List<GuideFile>) (guideFileDao.SelectList(condition)));
		resultMap.put("contentListTotalCnt", (Integer) (guideFileDao.SelectListTotalCnt(condition)));
		
		return resultMap;
	}

	@Override
	public GuideFile findby(Map<String, Object> condition) throws Exception {
		// TODO Auto-generated method stub
		return guideFileDao.select(condition);
	}

	@Override
	public GuideFile add(GuideFile guideFile) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public GuideFile modify(GuideFile guideFile) throws Exception {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public int remove(Map<String, Object> condition) throws Exception {
		// TODO Auto-generated method stub
		return guideFileDao.delete(condition);
	}

}
